package org.rvk.vms.dal.dao;

import javax.persistence.NamedQuery;

import org.rvk.vms.dal.entities.User;

/**
 * User Dao for User specific DAO
 * 
 * @author Ashish Kumar Sinha <aksinha.mail@gmail.com>
 *
 */
@NamedQuery(name="User.findByUsername", query="SELECT u FROM User u WHERE LOWER(u.username) = LOWER(:username)")
public interface UserDao {
	
	/**
     * Finds a user by the username.
     * @param username
     * @return  A user whose username is an exact match with the given username.
     *          If no persons is found, this method returns an empty list.
     */
    public User findByUsername(String username);
}
